package com.lottery.htbc.dao;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lottery.htbc.dto.ConfigTaskDto;
import com.lottery.htbc.mapper.BetConfigMapper;
import com.lottery.htbc.pojo.BetConfig;


@Service
public class BetConfigDao {


	@Autowired
	private BetConfigMapper betConfigMapper;

	public List<BetConfig> queryAll(){
		BetConfig param=new BetConfig();
		List<BetConfig> configs = betConfigMapper.select(param);
		return configs;
	}
	
	/**
	 * 根据任务时间(小时) 获取用户配置<br/>
	 * @param hour
	 * @return
	 */
	public List<ConfigTaskDto> queryByTaskHour(Integer hour){
		return betConfigMapper.queryByTaskHour(hour);
	}

	public List<BetConfig> queryValidAll() {
		BetConfig param=new BetConfig();
		param.setIsValid(1);
		return betConfigMapper.select(param);
	}

	public List<BetConfig> queryByInfo(BetConfig betConfig) {
		return betConfigMapper.select(betConfig);
	}

}
